package com.usian.pojo;

import java.io.Serializable;
import java.util.Map;

public class SearchItem2 implements Serializable {
    private String id;
    private String item_title;
    private String item_sell_point;
    private String item_price;
    private String item_image;
    private String item_category_name;
    private String item_desc;

    public SearchItem2() {
    }

    public SearchItem2(String id, String item_title, String item_sell_point, String item_price, String item_image, String item_category_name, String item_desc) {
        this.id = id;
        this.item_title = item_title;
        this.item_sell_point = item_sell_point;
        this.item_price = item_price;
        this.item_image = item_image;
        this.item_category_name = item_category_name;
        this.item_desc = item_desc;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getItem_title() {
        return item_title;
    }

    public void setItem_title(String item_title) {
        this.item_title = item_title;
    }

    public String getItem_sell_point() {
        return item_sell_point;
    }

    public void setItem_sell_point(String item_sell_point) {
        this.item_sell_point = item_sell_point;
    }

    public String getItem_price() {
        return item_price;
    }

    public void setItem_price(String item_price) {
        this.item_price = item_price;
    }

    public String getItem_image() {
        return item_image;
    }

    public void setItem_image(String item_image) {
        this.item_image = item_image;
    }

    public String getItem_category_name() {
        return item_category_name;
    }

    public void setItem_category_name(String item_category_name) {
        this.item_category_name = item_category_name;
    }

    public String getItem_desc() {
        return item_desc;
    }

    public void setItem_desc(String item_desc) {
        this.item_desc = item_desc;
    }
    public SearchItem2(TbItem item) {
        this.id = item.getId().toString();
        this.item_title = item.getTitle();
        this.item_sell_point = item.getSellPoint();
        this.item_price = item.getPrice().toString();
        this.item_image = item.getImage();
    }
    //用map接收参数
    public SearchItem2(Map<String, Object> map) {
        this.id = ((Long) map.get("id")).toString();
        this.item_title = (String) map.get("item_title");
        this.item_sell_point = (String) map.get("item_sell_point");
        this.item_price = ((Long) map.get("item_price")).toString();
        this.item_image = (String) map.get("item_image");
        this.item_category_name = (String) map.get("item_category_name");
        this.item_desc = (String) map.get("item_desc");
    }
}
